//
//  MyMeatShopCell.m
//  PigMarket
//
//  Created by 张敬 on 2019/8/15.
//  Copyright © 2019年 pigmarket.oc. All rights reserved.
//

#import "MyMeatShopCell.h"

@implementation MyMeatShopCell

-(void)setupUI{
    
    self.backgroundColor = KWhiteColor;
    
    [self.contentView addSubview:self.shopIcon];
    [self.contentView addSubview:self.titleLab];
    [self.contentView addSubview:self.detailLab];
}


- (void)setupLayout
{
    {
        _shopIcon.size = CGSizeMake(50, 50);
        _shopIcon.mj_x = 50;
        _shopIcon.mj_y = 20;
    }
    
    {
        _titleLab.size = CGSizeMake(100, 25);
        _titleLab.mj_x = _shopIcon.right + 25;
        _titleLab.mj_y = 22;
    }
    
    {
        _detailLab.size = CGSizeMake(KScreenWidth - _shopIcon.width - 80, 25);
        _detailLab.mj_x = _shopIcon.right + 25;
        _detailLab.mj_y = _titleLab.bottom + 2;
    }
}


- (UIImageView *)shopIcon{
    if (!_shopIcon) {
        _shopIcon = [[UIImageView alloc] init];
        [self addShadowAndCircleCorner:_shopIcon.layer corner:5];
        _shopIcon.image = [UIImage imageNamed:@"p1"];
    }
    return _shopIcon;
}


- (UILabel *)titleLab{
    
    if (! _titleLab){
        _titleLab = [UILabel makeLabelWithText:@"" textColor:UIColorFromRGB(0x333333) font:mMediumFont(18) textAliment:0];
    }
    return _titleLab;
}


- (UILabel *)detailLab{
    
    if (!_detailLab){
        _detailLab = [UILabel makeLabelWithText:@"" textColor:UIColorFromRGB(0x333333) font:mFont(13) textAliment:0];
    }
    return _detailLab;
}


@end
